import React from 'react'
import { InputItem } from 'antd-mobile'
import classNames from 'classnames'
import FormItemHOC from './form-hoc'

const prefixCls = 'zhang-form-input-item'

class InputItemA extends React.PureComponent {
  static defaultProps = {
    editable: true
  }

  render() {
    const {
      className,
      ...others
    } = this.props
    
    const cls = classNames({
      [prefixCls]: true,
      editable: this.props.editable,
      [className]: className,
    })

    return (
      <InputItem {...others} className={cls}/>
    )
  }
}

export default FormItemHOC(InputItemA)
